package com.zzxz.practicaltrainingsys.service;

import com.github.pagehelper.PageInfo;
import com.zzxz.practicaltrainingsys.entity.College;
import com.zzxz.practicaltrainingsys.entity.School;
import com.zzxz.practicaltrainingsys.entity.Topic;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface TopicService {
    //查询所有选题
    List<Topic> getTopic();

     List<String> getTopicTypes();

    List<Topic> getTopicsByProjectId(Integer project_id);

    int insertTopic(Topic topic);

    int updateTopic(Topic topic);

    int  deleteTopicById(Integer id);

    PageInfo<Topic> findTopicPages(Integer pageNum, Integer  pageSize);

    //根据选题分类查找选题名称
    List<Topic> getTopicByTopicType(String topic_type);

    String getTopicState(Integer topic_id);

    int updateTopicStateWhenInsertProject(@Param("topic_id") Integer topic_id, @Param("topic_state") String topic_state);

    //根据学校编号查学校信息
    public School getSchoolById(Integer school_id);
    //根据学院编号查询学院信息
    public College getCollegeById(Integer college_id);
}
